package com.tianhua.javs.core.func.translate.log;

import com.tianhua.javs.client.bean.JavsSegmentBean;
import com.tianhua.javs.client.func.ITranslatorFunc;
import com.tianhua.javs.core.annotations.Segment;
import com.tianhua.javs.core.func.translate.AbstractTranslator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Description:
 * date: 2022/2/12
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
@Component(value = "loginfo")
@Segment(tag = "loginfo",scriptFuncBean = "logFunc")
public class Loginfo extends AbstractTranslator implements ITranslatorFunc {
    @Override
    public JavsSegmentBean translate(String shellSegment) {
        //log这里默认使用lombok的@Sl4j 注解 变量是log
        return  translateStartReplaceFirst(shellSegment, Loginfo.class,"log.info");
    }
}
